package com.dc.free.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.kit.Prop;
import com.jfinal.kit.PropKit;
import com.jfinal.weixin.sdk.api.ApiConfig;
import com.jfinal.weixin.sdk.api.ApiConfigKit;

public class WeiXInConfigIntercept implements Interceptor{
	public static Prop prop = PropKit.use("config.properties");
	public static ApiConfig apiConfig = new ApiConfig(prop.get("app.token"),
			prop.get("app.id"), prop.get("app.secret"));

	public void intercept(Invocation inv) {
		ApiConfigKit.setThreadLocalApiConfig(apiConfig);
		inv.invoke();

	}

}
